package com.hospital.hospital.service.impl;

import com.hospital.hospital.bean.Bill;
import com.hospital.hospital.mapper.BillMapper;
import com.hospital.hospital.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xfm
 * @create 2021/9/6
 */
@Service
public class BillServiceImpl implements BillService {
    @Autowired
    private BillMapper billMapper;


    @Override
    public void insert(Bill bill) throws Exception {
        billMapper.insert(bill);
    }

    @Override
    public List<Bill> show(String name) throws Exception {
        List<Bill> bills = billMapper.queryByName(name);
        return bills;
    }
}
